/**
 * 登录和注册的切换
 */
let as = document.getElementsByClassName('switch-menu')[0].getElementsByTagName('a');
let contents = document.getElementsByClassName('dom');
for (let i = 0; i < as.length; i++) {
    let a = as[i];
    a.index = i
    a.onclick = function () {
        for (let j = 0; j < as.length; j++) {
            as[j].className = ""
            contents[j].style.display = "none"
        }
        this.className = "selected"
        contents[this.index].style.display = "block"
        console.log(contents[this.index]);
    }
}

/**
 * 二维码的显示和隐藏
 */
let icon = document.getElementsByClassName('change')[0].getElementsByTagName('i');
let login = document.querySelector('.login');
let qrcode = document.querySelector('.longin-quick');
for (let i = 0; i < icon.length; i++) {
    ic = icon[i];
    ic.index = i;
    ic.onclick = function () {
        for (let j = 0; j < icon.length; j++) {
            login.className = ""
            icon[j].style.display = 'block'

        }
        login.className = "longin-quick"
        qrcode.style.display = 'block'
        this.style.display = 'none'


    }


}
console.log(login);
console.log(qrcode);
